<style>
	table.form_table {
		width:100%;
		margin:auto;
		font-size:14px;
	}
	table.form_table tr td:first-child {
		text-align:left;
		vertical-align:top;
		padding-top:6px;
		width:40%;
	}
</style>
<?=form_open("inventory/update_inv/{$item->item_id}", 'id="inv_form"');?>
<table class="form_table">
	<tr>
		<td>Item Name:</td>
		<td><?=form_input(array('type' => 'text', 'name' => 'item_name', 'value' => $item->item_name, 'readonly'=>'true'))?></td>
	</tr>
	<tr>
		<td>Current:</td>
		<td><?=form_input(array('type' => 'text', 'name' => 'item_quantity_current', 'value' => $item->item_quantity, 'readonly'=>'true'))?></td>
	</tr>
	<tr>
		<td>Options:</td>
		<td style="padding-top:7px;">
			<input  type="radio" id="gender_male" value="Checked In" name="option" checked="true"/>
				Check In
			<input  type="radio" id="gender_female" value="Checked Out" name="option"/>
				Check Out
			<br/>
		</td>
	</tr>
	<tr>
		<td>Quantity:</td>
		<td><?=form_input(array('type' => 'text', 'name' => 'item_quantity', 'value' => ''))?></td>
	</tr>
	<tr>
		<td>Comment:</td>
		<td><?=form_textarea(array('type' => 'text', 'name' => 'activity_comment', 'rows' => '4', 'cols' => '16', 'style' => 'resize:none;overflow:hidden;'))?></td>
	</tr>
</table>
<?=form_close();?>
<script>
	$(function(){
		$('#inv_form').validate({
			rules: {
				item_quantity: {required:true,digits:true}
			},
			submitHandler: function(form) {
	       	    $(form).ajaxSubmit(function(response) {
	       	    	inv_pagination_init();
					$(form).parents('.ui-dialog-content').dialog('close');
				});
			}
		});
	});
</script>